package com.liantong.client.api.action;

import java.io.File;
import java.util.List;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import com.liantong.common.po.App;
import com.liantong.common.po.Category;
import com.liantong.common.vo.InsertAppInfo;
import com.liantong.service.cms.AppService;
import com.liantong.service.cms.CategoryService;
import com.liantong.service.util.Constant;
import com.liantong.util.JsonUtil;
import com.liantong.util.PropertyLoader;
import com.liantong.util.StringUtil;


public class AppAction extends AbstractAction {

	private static final long serialVersionUID = 1L;
	
	@Resource(name="appService")
	private AppService appService;

	@Resource(name="categoryService")
	private CategoryService categoryService;
	
	private List<App> apps;
		
	@Action(value = "c_getApp")
	public String listApp(){
		apps = appService.getAll();
		String json = JsonUtil.getJSONString(apps);
		return ajaxJson(json);
	}
		
	public List<App> getApps() {
		return apps;
	}

	public void setApps(List<App> apps) {
		this.apps = apps;
	}
	
	
}
